Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: marked package as free of side-effects #81

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

GauBen
Copy link
Contributor

@GauBen GauBen commented Sep 17, 2024

Hey!

I noticed a bare import to devalue in svelte-kit SSR output: (.svelte-kit/output/server/chunks/client.js)

import "./exports.js";
import "devalue";
function get(key, parse = JSON.parse) {
  try {
    return parse(sessionStorage[key]);
  } catch {
  }
}
const SNAPSHOT_KEY = "sveltekit:snapshot";
const SCROLL_KEY = "sveltekit:scroll";
get(SCROLL_KEY) ?? {};
get(SNAPSHOT_KEY) ?? {};

This directive will ensure that this bare import is removed during the build

@Rich-Harris Rich-Harris merged commit 566b961 into Rich-Harris:master Sep 25, 2024
3 checks passed
@Rich-Harris
Copy link
Owner

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants